<?php
	if(!isset($_REQUEST['ajax'])){ $_REQUEST['ajax'] = "";}
	if($_REQUEST['ajax']!=true) include 'header.tpl.php';
	include 'usercp_panel.tpl.php';
?>
	<div class="row">
		<div class="col-lg-4">
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title"><i class="icon-user"></i> <?php echo $this->language['detail'];?></div>
				</div>
				<div class="panel-body">
					<ul class="list-group">
						<li class="list-group-item">
							<b><?php echo $this->language['username'];?></b>
							<span class="pull-right"><?php echo $_SESSION['userUsername'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['fullname'];?></b>
							<span class="pull-right"><?php echo $_SESSION['userFullname'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['address'];?></b>
							<span class="pull-right"><?php echo $_SESSION['userAddress'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['phone'];?></b>
							<span class="pull-right"><?php echo $_SESSION['userPhone'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['email'];?></b>
							<span class="pull-right"><?php echo $_SESSION['userEmail'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['departments'];?></b>
							<span class="pull-right"><?php echo $_SESSION['roomName'];?></span>
						</li>
						<li class="list-group-item">
							<b><?php echo $this->language['position'];?></b>
							<span class="pull-right">
								<?php
								if($_SESSION['userType'] == 1) echo $this->language['departmen_chief'];
								elseif($_SESSION['userType'] == 2) echo $this->language['departmen_deputy_chief'];
								elseif($_SESSION['userType'] == 3) echo $this->language['departmen_employee'];
								else echo $this->language['unknown']; ?>
							</span>
						</li>
					</ul>
				</div>
			</div>
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title"><i class="icon-list"></i> <?php echo $this->language['logs'];?></div>
				</div>
				<div class="panel-body">
					<table class="table table-hover table-condensed table-fixed">
						<thead>
							<tr>
								<th width='140px'><?php echo $this->language['time'];?></th>
								<th><?php echo $this->language['description'];?></th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
		<div class="col-lg-8">
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title"><i class="icon-cog"></i> <?php echo $this->language['change_password'];?></div>
				</div>
				<div class="panel-body">
					<form action="javascript:change_pass();" class="form-horizontal" id="change_pass">
						<input type="hidden" name="mod" value="change_pass" />
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['old_password'];?></label>
							<div class="col-lg-6">
								<input type="password" class="form-control" name="old_pass">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['new_password'];?></label>
							<div class="col-lg-6">
								<input type="password" class="form-control" name="new_pass">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['conf_password'];?></label>
							<div class="col-lg-6">
								<input type="password" class="form-control" name="new_pass_2">
							</div>
						</div>
						<div class="form-group">
							<div class="col-lg-offset-3 col-lg-8">
								<button class="btn btn-primary" type="submit"><?php echo $this->language['accept'];?></button>
							</div>
						</div>
					</form>
				</div>
			</div>
			<div class="panel">
				<div class="panel-heading">
					<div class="panel-title"><i class="icon-cog"></i> <?php echo $this->language['change_information'];?></div>
				</div>
				<div class="panel-body">
					<form action="javascript:change_info();" class="form-horizontal" id="change_info">
						<input type="hidden" name="mod" value="change_info" />
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['fullname'];?></label>
							<div class="col-lg-6">
								<input type="text" class="form-control" name="fullname" value="<?php echo $_SESSION['userFullname'];?>" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['address'];?></label>
							<div class="col-lg-6">
								<input type="text" class="form-control" name="address" value="<?php echo $_SESSION['userAddress'];?>" />
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['phone'];?></label>
							<div class="col-lg-4">
								<input type="text" class="form-control" name="phone" value="<?php echo $_SESSION['userPhone'];?>">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['email'];?></label>
							<div class="col-lg-6">
								<input type="text" class="form-control" name="email" value="<?php echo $_SESSION['userEmail'];?>">
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['language'];?></label>
							<div class="col-lg-4">
								<select name="language" class="form-control">
									<option value="vi">Tiếng Việt</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3">Giao diện</label>
							<div class="col-lg-4">
								<select name="template" class="form-control">
									<option value="default">Mặc định</option>
									<option value="apricot">Apricot</option>
								</select>
							</div>
						</div>
						<div class="form-group">
							<label class="control-label col-lg-3"><?php echo $this->language['conf_password'];?></label>
							<div class="col-lg-4">
								<input type="password" class="form-control" name="password">
							</div>
						</div>
						<div class="form-group">
							<div class="col-lg-offset-3 col-lg-8">
								<button class="btn btn-primary" type="submit"><?php echo $this->language['accept'];?></button>
								<button class="btn btn-danger" type="reset">Reset</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
<?php if(isset($this->breadcrumb) && isset($this->title_header)):?>
	<script type="text/javascript">
		$(function() {
			$("#title-header").text('<?php echo $this->title_header;?>');
			$("#breadcrumb").html('<?php echo build_breadcrumb($this->breadcrumb);?>');
		});
	</script>
<?php endif;?>
<?php
	if($_REQUEST['ajax']!=true) include 'footer.tpl.php';
?>